#include <iostream>
#include <vector>

using namespace std;

int main()
{
    //验证g++ 下SGI版本的STL，扩容方式
    vector<int> v;
    size_t newcap = v.capacity();
    for(int i = 0; i < 150; i++){
        v.push_back(i);
        if(newcap != v.capacity()){
            newcap = v.capacity();
            cout << i<< '.' << endl;
            cout << "capacity is :" << newcap << endl;
        }
    }
    return 0;
}
